//If you're editing this by hand, you're doing something wrong
using System;
using Reddit.EndpointRetriever;
using Reddit.Api.Parameters;
namespace Reddit.Api
{
	public class StoryApi<T> : Reddit.Api.ApiBase<T>
	{
		public StoryApi(IEndpointRetriever<T> endpointRetriever) : base(endpointRetriever) {}
		public T GetStoriesHot(GetStoriesHotParameters parameters)
		{
			if (parameters == null)
				parameters = new GetStoriesHotParameters();
			Endpoint endpoint = new Endpoint();
			endpoint.AddPart(parameters.subreddit, "r/{0}");
			endpoint.AddStaticPart("hot");
			return this.RetrieveEndpoint(endpoint);
		}
		public T GetStoriesNew(GetStoriesNewParameters parameters)
		{
			if (parameters == null)
				parameters = new GetStoriesNewParameters();
			Endpoint endpoint = new Endpoint();
			endpoint.AddPart(parameters.subreddit, "r/{0}");
			endpoint.AddStaticPart("new");
			endpoint.AddOption("sort", parameters.sort, null);
			endpoint.AddOption("after", parameters.after, null);
			endpoint.AddOption("before", parameters.before, null);
			return this.RetrieveEndpoint(endpoint);
		}
		public T GetStoriesControversial(GetStoriesControversialParameters parameters)
		{
			if (parameters == null)
				parameters = new GetStoriesControversialParameters();
			Endpoint endpoint = new Endpoint();
			endpoint.AddPart(parameters.subreddit, "r/{0}");
			endpoint.AddStaticPart("controversial");
			endpoint.AddOption("t", parameters.t, null);
			endpoint.AddOption("after", parameters.after, null);
			endpoint.AddOption("before", parameters.before, null);
			return this.RetrieveEndpoint(endpoint);
		}
		public T GetStoriesTop(GetStoriesTopParameters parameters)
		{
			if (parameters == null)
				parameters = new GetStoriesTopParameters();
			Endpoint endpoint = new Endpoint();
			endpoint.AddPart(parameters.subreddit, "r/{0}");
			endpoint.AddStaticPart("top");
			endpoint.AddOption("t", parameters.t, null);
			endpoint.AddOption("after", parameters.after, null);
			endpoint.AddOption("before", parameters.before, null);
			return this.RetrieveEndpoint(endpoint);
		}
		public T GetStoriesById(GetStoriesByIdParameters parameters)
		{
			if (parameters == null)
				throw new Exception("Parameters cannot be null");
			Endpoint endpoint = new Endpoint();
			endpoint.AddStaticPart("by_id");
			endpoint.AddPart(parameters.ids, null);
			endpoint.AddOption("after", parameters.after, null);
			endpoint.AddOption("before", parameters.before, null);
			return this.RetrieveEndpoint(endpoint);
		}
		public T GetStoriesByUrl(GetStoriesByUrlParameters parameters)
		{
			if (parameters == null)
				throw new Exception("Parameters cannot be null");
			Endpoint endpoint = new Endpoint();
			endpoint.AddStaticPart("api");
			endpoint.AddStaticPart("info");
			endpoint.AddOption("url", parameters.url, null);
			return this.RetrieveEndpoint(endpoint);
		}
		public T GetStoryRelated(GetStoryRelatedParameters parameters)
		{
			if (parameters == null)
				throw new Exception("Parameters cannot be null");
			Endpoint endpoint = new Endpoint();
			endpoint.AddPart(parameters.subreddit, "r/{0}");
			endpoint.AddStaticPart("related");
			endpoint.AddPart(parameters.storyId, null);
			endpoint.AddOption("after", parameters.after, null);
			endpoint.AddOption("before", parameters.before, null);
			return this.RetrieveEndpoint(endpoint);
		}
		public T GetStoryComments(GetStoryCommentsParameters parameters)
		{
			if (parameters == null)
				throw new Exception("Parameters cannot be null");
			Endpoint endpoint = new Endpoint();
			endpoint.AddPart(parameters.subreddit, "r/{0}");
			endpoint.AddStaticPart("comments");
			endpoint.AddPart(parameters.storyId, null);
			endpoint.AddPart(parameters.commentId, "comment/{0}");
			endpoint.AddOption("sort", parameters.sort, null);
			endpoint.AddOption("all", parameters.all, null);
			return this.RetrieveEndpoint(endpoint);
		}
	}
	public class SubredditApi<T> : Reddit.Api.ApiBase<T>
	{
		public SubredditApi(IEndpointRetriever<T> endpointRetriever) : base(endpointRetriever) {}
		public T GetSubreddits(GetSubredditsParameters parameters)
		{
			if (parameters == null)
				parameters = new GetSubredditsParameters();
			Endpoint endpoint = new Endpoint();
			endpoint.AddStaticPart("reddits");
			endpoint.AddOption("after", parameters.after, null);
			endpoint.AddOption("before", parameters.before, null);
			endpoint.AddOption("search", parameters.search, null);
			return this.RetrieveEndpoint(endpoint);
		}
	}
	public class UserApi<T> : Reddit.Api.ApiBase<T>
	{
		public UserApi(IEndpointRetriever<T> endpointRetriever) : base(endpointRetriever) {}
		public T GetUserSubmitted(GetUserSubmittedParameters parameters)
		{
			if (parameters == null)
				throw new Exception("Parameters cannot be null");
			Endpoint endpoint = new Endpoint();
			endpoint.AddStaticPart("user");
			endpoint.AddPart(parameters.userName, null);
			endpoint.AddStaticPart("submitted");
			endpoint.AddOption("after", parameters.after, null);
			endpoint.AddOption("before", parameters.before, null);
			return this.RetrieveEndpoint(endpoint);
		}
		public T GetUserLiked(GetUserLikedParameters parameters)
		{
			if (parameters == null)
				throw new Exception("Parameters cannot be null");
			Endpoint endpoint = new Endpoint();
			endpoint.AddStaticPart("user");
			endpoint.AddPart(parameters.userName, null);
			endpoint.AddStaticPart("liked");
			endpoint.AddOption("after", parameters.after, null);
			endpoint.AddOption("before", parameters.before, null);
			return this.RetrieveEndpoint(endpoint);
		}
		public T GetUserDisliked(GetUserDislikedParameters parameters)
		{
			if (parameters == null)
				throw new Exception("Parameters cannot be null");
			Endpoint endpoint = new Endpoint();
			endpoint.AddStaticPart("user");
			endpoint.AddPart(parameters.userName, null);
			endpoint.AddStaticPart("disliked");
			endpoint.AddOption("after", parameters.after, null);
			endpoint.AddOption("before", parameters.before, null);
			return this.RetrieveEndpoint(endpoint);
		}
		public T GetUserHidden(GetUserHiddenParameters parameters)
		{
			if (parameters == null)
				throw new Exception("Parameters cannot be null");
			Endpoint endpoint = new Endpoint();
			endpoint.AddStaticPart("user");
			endpoint.AddPart(parameters.userName, null);
			endpoint.AddStaticPart("hidden");
			endpoint.AddOption("after", parameters.after, null);
			endpoint.AddOption("before", parameters.before, null);
			return this.RetrieveEndpoint(endpoint);
		}
		public T GetUserComments(GetUserCommentsParameters parameters)
		{
			if (parameters == null)
				throw new Exception("Parameters cannot be null");
			Endpoint endpoint = new Endpoint();
			endpoint.AddStaticPart("user");
			endpoint.AddPart(parameters.userName, null);
			endpoint.AddStaticPart("comments");
			endpoint.AddOption("after", parameters.after, null);
			endpoint.AddOption("before", parameters.before, null);
			return this.RetrieveEndpoint(endpoint);
		}
		public T GetUser(GetUserParameters parameters)
		{
			if (parameters == null)
				throw new Exception("Parameters cannot be null");
			Endpoint endpoint = new Endpoint();
			endpoint.AddStaticPart("user");
			endpoint.AddPart(parameters.userName, null);
			endpoint.AddStaticPart("about");
			return this.RetrieveEndpoint(endpoint);
		}
	}
}